package cn.tedu.spring.scope;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestOrder {
    public static void main(String[] args) {
        // 创建IoC容器
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("cn.tedu.spring.scope");
        //获取第1次
        Order order = context.getBean(Order.class);
        System.out.println(order);
        //获取第2次
        Order order2 = context.getBean(Order.class);
        System.out.println(order2);
    }
}
